﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Net.Http;

namespace OSS.Http
{
    /// <summary>
    /// 
    /// </summary>
    public class HttpManager
    {
        private readonly IHttpClientFactory _httpClientFactory;

        public HttpManager(IHttpClientFactory httpClientFactory)
        {
            _httpClientFactory = httpClientFactory;
        }

        public HttpClient HttpClient => _httpClientFactory.CreateClient();

        public HttpClient HttpClientWithName(string name)
        {
            return _httpClientFactory.CreateClient(name);
        }
    }
}
